package timer;

import java.text.SimpleDateFormat;
import java.util.TimerTask;

/**
 * Created by Ming on 2017/6/3.
 */
public class DancingRobot extends TimerTask {
    @Override
    public void run() {
        SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println(sf.format(scheduledExecutionTime()));
        System.out.println("dancing");
    }
}
